<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html>
    <head>
        <meta charset="utf-8">
        <!--
        Customize this policy to fit your own app's needs. For more guidance, please refer to the docs:
            https://cordova.apache.org/docs/en/latest/
        Some notes:
            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                * Enable inline JS: add 'unsafe-inline' to default-src
        -->
        <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: https://ssl.gstatic.com https://v3.alapi.cn https://www.alapi.cn 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' https://v3.alapi.cn https://www.alapi.cn; frame-src https://www.alapi.cn;">
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
        <meta name="color-scheme" content="light dark">
        <link rel="stylesheet" href="css/index.css">
        <title>Hello World</title>
        <style>
            .features-container {
                max-width: 1200px;
                margin: 40px auto;
                padding: 0 20px;
            }
            .features-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 25px;
                margin-top: 30px;
            }
            .feature-card {
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                border-radius: 12px;
                padding: 30px;
                text-decoration: none;
                color: white;
                transition: transform 0.3s, box-shadow 0.3s;
                box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .feature-card:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
            }
            .feature-icon {
                font-size: 48px;
                margin-bottom: 15px;
            }
            .feature-card h3 {
                margin: 0 0 10px 0;
                font-size: 1.5em;
                color: white;
            }
            .feature-card p {
                margin: 0;
                font-size: 0.95em;
                opacity: 0.9;
                line-height: 1.6;
            }
            @media (max-width: 768px) {
                .features-grid {
                    grid-template-columns: 1fr;
                }
                .features-container h2 {
                    font-size: 1.5em;
                }
            }
        </style>
    </head>
    <body>
        <div class="nav" style="background-color: #2c3e50; padding: 15px; text-align: center; margin-bottom: 20px;">
            <a href="index.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">首页</a>
            <a href="about.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">关于我们</a>
            <a href="poem.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">藏头诗</a>
            <a href="translate.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">翻译</a>
            <a href="express.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">快递查询</a>
            <a href="ip.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">IP查询</a>
            <a href="workday.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">工作日查询</a>
            <a href="network.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">网络状态</a>
            <a href="vibrate.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">震动功能</a>
            <a href="battery.html" style="color: #fff; text-decoration: none; margin: 0 15px; font-size: 16px; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s;">电池状态</a>
        </div>
        <div class="app">
            <h1>Apache Cordova</h1>
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>
            </div>
        </div>
        
        <!-- 功能卡片导航 -->
        <div class="features-container" id="features-container" style="display: none;">
            <h2 style="text-align: center; color: #2c3e50; margin-bottom: 30px; font-size: 1.8em;">应用功能</h2>
            <div class="features-grid">
                <a href="poem.html" class="feature-card">
                    <div class="feature-icon">📝</div>
                    <h3>藏头诗</h3>
                    <p>输入关键字，生成优美的藏头、藏尾、藏中等诗词</p>
                </a>
                <a href="translate.html" class="feature-card">
                    <div class="feature-icon">🌍</div>
                    <h3>翻译</h3>
                    <p>支持30+种语言的文本翻译，自动检测语言类型</p>
                </a>
                <a href="express.html" class="feature-card">
                    <div class="feature-icon">📦</div>
                    <h3>快递查询</h3>
                    <p>查询快递物流轨迹，支持主流快递公司</p>
                </a>
                <a href="ip.html" class="feature-card">
                    <div class="feature-icon">🌐</div>
                    <h3>IP查询</h3>
                    <p>高精度IP归属地查询，支持IPv4和IPv6</p>
                </a>
                <a href="workday.html" class="feature-card">
                    <div class="feature-icon">📅</div>
                    <h3>工作日查询</h3>
                    <p>查询指定日期范围内的工作日、周末、节假日和补班情况</p>
                </a>
                <a href="network.html" class="feature-card">
                    <div class="feature-icon">📡</div>
                    <h3>网络状态监听</h3>
                    <p>实时监听网络连接状态和网络类型变化</p>
                </a>
                <a href="vibrate.html" class="feature-card">
                    <div class="feature-icon">📳</div>
                    <h3>震动功能</h3>
                    <p>触发设备振动，提供触觉反馈</p>
                </a>
                <a href="battery.html" class="feature-card">
                    <div class="feature-icon">🔋</div>
                    <h3>电池状态</h3>
                    <p>实时监测设备电池电量和充电状态</p>
                </a>
            </div>
        </div>
        
        <div id="device-info-placeholder"></div>
        <div id="camera-info-placeholder"></div>
        <script src="cordova.js"></script>
        <script src="js/utils.js"></script>
        <script src="js/index.js"></script>
    </body>
</html>
